package com.yaozheng.vocationaltraining.activity;

import android.content.res.Configuration;

import org.androidannotations.annotations.EActivity;

import com.yaozheng.vocationaltraining.R;

/**
 * 测试界面
 *
 * @author xiaoqing
 */
@EActivity(R.layout.activity_test_view_main)
public class MainTestActivity extends BaseActivity {

    public void onConfigurationChanged(Configuration newConfig) {

        super.onConfigurationChanged(newConfig);

//切换为竖屏

        if (newConfig.orientation == this.getResources().getConfiguration().ORIENTATION_PORTRAIT) {
            System.out.println("-------------------------竖屏");

        }

//切换为横屏

        else if (newConfig.orientation == this.getResources().getConfiguration().ORIENTATION_LANDSCAPE) {
            System.out.println("-------------------------横屏");
        }
    }
}
